package teach.aistar.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import teach.aistar.model.entity.CarDetail;
import teach.aistar.model.vo.Result;
import teach.aistar.service.IBuyCarsService;

import javax.servlet.http.HttpServletRequest;

@Controller

public class CollectController {


    @Autowired
    private IBuyCarsService iBuyCarsService;

    @PostMapping("/user/collect")
    @ResponseBody
    public Result collect(HttpServletRequest req)
 {

     String pid = req.getParameter("pid");

     CarDetail carDetail = iBuyCarsService.findId(Integer.valueOf(pid));

        return new Result("200","收藏成功",null);
 }

}
